//
//  DetailScrollView.m
//  ProjectA
//
//  Created by 李赐岩 姜雪 张昕锐 on 15/3/7.
//  Copyright (c) 2015年 李赐岩 姜雪 张昕锐. All rights reserved.
//

#import "DetailScrollView.h"

@implementation DetailScrollView



-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}

-(void)creatView
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.ImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height / 2.9)];
    [self addSubview:self.ImageView];
    
    self.materialLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.origin.x + 20, self.ImageView.frame.size.height + 30, 50, 20)]  ;
    self.materialLabel.text = @"材料";
    self.materialLabel.font = [UIFont systemFontOfSize:20];
    [self addSubview:self.materialLabel];
    
    self.materialContextLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.materialLabel.frame.origin.x, self.materialLabel.frame.origin.y + self.materialLabel.frame.size.height + 20, self.frame.size.width - 30, self.frame.size.height)];
    self.materialContextLabel.font = [UIFont systemFontOfSize:18];
    self.materialContextLabel.numberOfLines = 0;
    NSLog(@"material%f", self.materialContextLabel.frame.size.height);
    [self addSubview:self.materialContextLabel];
    
    self.directionLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.materialLabel.frame.origin.x, self.materialContextLabel.frame.origin.y   + self.materialContextLabel.frame.size.height + 30, 50, 20)];
    NSLog(@"dada%f", self.directionLabel.frame.origin.y);
    self.directionLabel.text = @"做法";
    self.directionLabel.font = [UIFont systemFontOfSize:20];
    [self addSubview:self.directionLabel];
    
    self.directionLabelTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.directionLabel.frame.origin.x,self.directionLabel.frame.origin.y + self.directionLabel.frame.size.height + 20, self.frame.size.width - 30, 800)];
    NSLog(@"$$$$%f", self.directionLabelTextLabel.frame.size.width);
    //self.directionLabelTextLabel.text = @"12548";
    self.directionLabelTextLabel.font = [UIFont systemFontOfSize:18];
    self.directionLabelTextLabel.textAlignment = NSTextAlignmentLeft;
    self.directionLabelTextLabel.numberOfLines = 0;
    [self addSubview:self.directionLabelTextLabel];
    
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
